package com.zret.oasys.service;

import com.zret.oasys.dao.EmpDao;
import com.zret.oasys.dao.LeaveDao;
import com.zret.oasys.dao.impl.EmpDaoImpl;
import com.zret.oasys.dao.impl.LeaveDaoImpl;
import com.zret.oasys.dbtools.PageData;
import com.zret.oasys.entity.Leavedetails;
import com.zret.oasys.entity.Leavetable;

public interface LeaveService {
	// DAO加载
	LeaveDao leaveDao = new LeaveDaoImpl();
	EmpDao empDao = new EmpDaoImpl();
	// 员工向后台提交请假单
	boolean creatLeave(Leavetable leavetable, Leavedetails leavedetails);
	// 查找该员工的所有审批记录
	PageData<Leavedetails> getAllLeavedetails(int empid, int page, int pageSize);
	// 查找该员工未审批的请假单
	PageData<Leavedetails> getNotApprovedLeavedetails(int empid, int page, int pageSize);
	// 查找员工以审批的请假单
	PageData<Leavedetails> getApprovedLeavedetails(int empid, int page, int pageSize);
	// 查询请假单信息的综合方法
	PageData<Leavedetails> getLeavemsg(int empid, int page, int pageSize, String empname, String searchType);
	// 审批请假通过的操作
	boolean leaveApproval(String leavenum, int detailid, String comment);
	// 查看自己的考勤请假记录
	PageData<Leavetable> getMyselfLeaveMsg(int empid, String searchtype, int page, int pageSize);
	
}
